class Deposit < ApplicationRecord
  enum state: [:pending, :checkouted]

  belongs_to :user

  def send_notify(name, page_type = '', page_url = '', params = '')
    Notification.create(
      name: name,
      user_id: self.user_id,
      state: :unread,
      page_type: page_type,
      page_url: page_url,
      params: params,
    )
  end
end
